﻿#ifndef MENUDAO_H
#define MENUDAO_H

#include <QObject>
#include <menu.h>

class MenuDao
{
public:
    MenuDao(QSqlDatabase sqlDatabase);
    ~MenuDao();
    bool getListByParentId(QList<Menu> &list,uint64_t parentId);
    bool getList(QList<Menu> &list);
    bool getListByPageAndParam(QList<Menu> &list,const  uint64_t &page,const  uint64_t &pageSize);
    bool getTotalByParam(uint64_t &total);
    bool getOne(Menu &object);
    bool saveOne(Menu &object);
    bool deleteOne(Menu &object);
private:
    QSqlDatabase db;
};

#endif // MENUDAO_H
